package org.jet.emall.prod.transfer;

import org.jet.emall.prod.dto.BrandDTO;
import org.jet.emall.prod.dto.BrandDetailsDTO;
import org.jet.emall.prod.dto.NewBrandDTO;
import org.jet.emall.prod.dto.UpdateBrandDTO;
import org.jet.emall.prod.model.NewBrandModel;
import org.jet.emall.prod.model.UpdateBrandModel;
import org.jet.emall.prod.vo.BrandDetailsVO;
import org.jet.emall.prod.vo.BrandVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author xiaozai
 * @version 1.0
 * @date 2020-04-16 13:12
 */
@Mapper
public interface BrandVoTransfer {

    BrandVoTransfer INSTANCE = Mappers.getMapper(BrandVoTransfer.class);

    /**
     *  将品牌DTO列表转VO列表
     * @param list
     * @return
     */
    List<BrandVO> toVoList(List<BrandDTO> list);

    /**
     *  将新增品牌模型转DTO
     * @param brandModel
     * @return
     */
    NewBrandDTO toDto(NewBrandModel brandModel);


    /**
     *  将 修改品牌 模型转DTO
     * @param brandModel
     * @return
     */
    UpdateBrandDTO toDto(UpdateBrandModel brandModel);

    /**
     *  将品牌详情DTO转VO
     * @param brandDetailsDTO
     * @return
     */
    BrandDetailsVO toVo(BrandDetailsDTO brandDetailsDTO);
}
